﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="author" content="ISUX">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>聚会列表</title>
    <link rel="stylesheet" href="/ViewMob/css/wxui.css">
    <link rel="stylesheet" href="/ViewMob/css/group.css">
    <link href="//at.alicdn.com/t/font_qqztt1cpq09kke29.css" rel="stylesheet" />
    <link href="/ViewMob/js/layer/need/layer.css" rel="stylesheet" />
    <script src="/ViewMob/js/layer/layer.m.js"></script>
    <style>
        .ms-controller, [ms-controller] {
            display: none;
        }

        .page {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            opacity: 0;
            z-index: 1;
        }

            .page.js_show {
                opacity: 1;
            }

        .page__hd {
            padding: 24px;
            text-align: center;
            background: #4faeff url(../images/bg-account.jpg) 100% 100%;
            color: white;
        }

        .page__bd_spacing {
            padding: 0 15px;
        }

        .page__ft {
            padding-top: 40px;
            padding-bottom: 10px;
            text-align: center;
        }

            .page__ft img {
                height: 19px;
            }

            .page__ft.j_bottom {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
            }

        .page__title {
            text-align: left;
            font-size: 20px;
            font-weight: 400;
        }

        .page__desc {
            margin-top: 5px;
            text-align: left;
            font-size: 14px;
        }

        .page.home .page__intro-icon {
            margin-top: -.2em;
            margin-left: 5px;
            width: 16px;
            height: 16px;
            vertical-align: middle;
        }

        .page.home .page__title {
            font-size: 0;
            margin-bottom: 15px;
        }


        .head-oneself {
            width: 4.5rem;
            height: 4.5rem;
            margin-left: 20px;
        }

            .head-oneself img {
                border: 2px solid rgba(0,0,0,.2);
            }

        .ybl {
            background-color: #10c55b;
            font-size: 30px;
            color: white;
        }

        .wbl {
            background-color: lightgray;
            font-size: 20px;
            color: white;
        }

        .YZ {
            POSITION: absolute;
            RIGHT: 10PX;
            TOP: 10PX;
            FONT-SIZE: 70PX;
            COLOR: #ff0000;
            line-height: 70px;
        }
    </style>
</head>
<body style="background-color: #f8f8f8;" ms-controller="PAGE">
    <div class="page__hd">
        <h1 class="page__title">聚会列表</h1>
        <p class="page__desc"></p>
    </div>
    <div class="page__bd">
        <!--<a href="javascript:;" class="weui-btn weui-btn_primary">点击展现searchBar</a>-->
        <div class="weui-search-bar weui-search-bar_focusing" id="searchBar" style="display: none">
            <form class="weui-search-bar__form">
                <div class="weui-search-bar__box">
                    <i class="weui-icon-search"></i>
                    <input type="search" class="weui-search-bar__input" id="searchInput" ms-duplex="searchkey" ms-on-change="change()" placeholder="输入关键字" required="">
                    <a href="javascript:" class="weui-icon-clear" id="searchClear" ms-click="clear()"></a>
                </div>
                <label class="weui-search-bar__label weui-search-bar_focusing" id="searchText">
                    <i class="weui-icon-search"></i>
                    <span>搜索</span>
                </label>
            </form>
            <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel" ms-click="query()">搜索</a>
        </div>


        <div class="weui-tab">
            <div class="weui-navbar">
                <div class="weui-navbar__item weui-bar__item_on" ms-click="seljh(0)">
                    聚会列表
                </div>
                <div class="weui-navbar__item " ms-click="seljh(1)">
                    我创建的
                </div>
               
            </div>
            <div class="weui-tab__panel">
                <div class="weui-panel" style="margin-top: 0">
                    <div class="weui-panel__hd">共计找到{{arrjh.size()}}条记录</div>

                    <div class="weui-panel__bd">
                        <div class="weui-media-box weui-media-box_text" ms-repeat-item="arrjh">
                            <i class="weui-icon-cancel" ms-if="item.shzt==0" style="position: absolute;right: 10px;font-size: 28px;" ms-click="delg(item)"></i>
                            <h4 class="weui-media-box__title">【{{item.shzt=='0'?'未审核':'已审核'}}】{{item.jh_name}}</h4>
                            <table>
                                <tr>
                                    <td>
                                        <div class="head-oneself" style="margin-left: 10px">
                                            <img src="/images/xszp/1.jpg" onerror="javascript:this.src='/ViewMob/images/tx1.gif';" style="border-radius: 5%; width: 100%; height: 100%; margin-left: -5px" />
                                        </div>
                                    </td>
                                    <td>
                                        <ul class="weui-media-box__info" style="margin-top: 5px; margin-left: 5px">
                                            <li class="weui-media-box__info__meta">发起人:{{item.jh_fqrxm}}</li>
                                        </ul>
                                        <ul class="weui-media-box__info" style="margin-top: 5px; margin-left: 5px">
                                            <li class="weui-media-box__info__meta">聚会时间:{{item.jh_rq}}</li>
                                            <li class="weui-media-box__info__meta weui-media-box__info__meta_extra">参加人数:{{item.jh_num}}</li>
                                        </ul>

                                        <ul class="weui-media-box__info" style="margin-top: 5px; margin-left: 5px">
                                            <li class="weui-media-box__info__meta">聚会地点:{{item.jh_addr}}</li>
                                        </ul>
                                    </td>
                                </tr>
                            </table>


                        </div>
                    </div>
                </div>
            </div>
        </div>

     

    </div>

    <script src="/ViewMob/js/zepto.min.js"></script>
    <script src="/ViewMob/js/weui.min.js"></script>
    <script src="/ViewMob/js/avalon1.47.js"></script>
    <script src="/ViewMob/js/ComFunJS.js"></script>

    <script type="text/javascript" class="searchbar js_show">
        var model = avalon.define({
            $id: "PAGE",
            arrjh: [],
            nouser: {},
            myjh: [],
            alljh: [],
            delg: function (item) {

                ComFunJS.winconfirm("是否要撤销该聚会?", function () {
                    $.post("/API/VIEWAPI.ashx?Action=Commanage_DELJH&r=" + Math.random(), { ID: item.ID }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            ComFunJS.winsuccess("操作成功")
                            location.reload();
                        }
                    });
                }, function () {
                    ComFunJS.closeAll()

                })



            },
            seljh: function (type) {
                if (type==0) {
                    model.arrjh = model.alljh.$model;
                } else {
                    model.arrjh = model.myjh.$model;
                }
            }
        })
        avalon.ready(function () {
            model.nouser = JSON.parse(ComFunJS.getCookie('userdata'));
            $.getJSON("/API/VIEWAPI.ashx?ACTION=COM_MJHLIST", { xh: model.nouser.xh }, function (result) {
                model.myjh = result.Result;
                model.alljh = result.Result1;
                model.seljh(0)

            })
            $('.weui-navbar__item').on('click', function () {
                $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            });

        })
    </script>
</body>
</html>
